<html>
  <head>
    <meta charset="utf8" />
    <title>Bureau</title>
	<link rel="stylesheet" href="style.css" />
  </head>
  <body>
<?php include("connexion-db.php");
include("retour-index.php"); ?>
<?php
$query_club='select NOM_CLUB from CLUB where ID_CLUB="'.$_GET['id-club'].'"';
$res_club = $db->query($query_club);
$data_club = $res_club->fetch();
?>
<p>Le bureau du club <?php echo $data_club['NOM_CLUB']; ?> :</p>
    <table>
	<tr>
	<th>Prénom</th>
	<th>Nom</th>
	<th>Fonction</th>
	</tr>
      <?php
	$query_bureau = 'select PRENOM, NOM, FONCTION
from PERSONNE P, MEMBRE_DE_BUREAU M, CLUB C
where C.ID_CLUB="'.$_GET['id-club'].'"
and M.ID_CLUB=C.ID_CLUB
and M.NUMERO_LICENCE=P.NUMERO_LICENCE';
	$res_bureau = $db->query($query_bureau);
	 while($data_bureau = $res_bureau->fetch()){
	 ?>
      <tr>
	<td><?php echo $data_bureau['PRENOM']; ?></td>
	<td><?php echo $data_bureau['NOM']; ?></a></td>
	<td><?php echo $data_bureau['FONCTION']; ?></td>
      </tr>
      <?php } ?>
    </table>
  </body>
</html>
